package com.hegongda.okcmall.product.dao;

import com.hegongda.okcmall.product.entity.CategoryBrandRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 品牌分类关联
 * 
 * @author Liuweidong
 * @email Liuweidong@gmail.com
 * @date 2021-01-31 17:57:14
 */
@Mapper
public interface CategoryBrandRelationDao extends BaseMapper<CategoryBrandRelationEntity> {

    @Select("select name from pms_brand where brand_id = #{id}")
    String getBrandName(@Param("id") Long brandId);

    @Select("select name from pms_category where cat_id = #{id}")
    String getCategoryName(@Param("id") Long catelogId);
}
